﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed
#pragma once
#include <string>
#include <vector>
#include <unordered_map>
#include "IJournalData.h"
#include "OwnerPtr.h"
#include "GcmpJournalInterface.h"

namespace gcmp
{
    class CommandParameters;
};

namespace gcmp
{
    /// \brief 日志录制回放数据：Command数据
    class GCMP_JOURNAL_INTERFACE_EXPORT IJournalCommandData : public IJournalData
    {
    public:
        virtual ~IJournalCommandData() {}

        /// \brief 创建一个IJournalCommondData实例
        ///
        /// \return IJournalCommondData实例
        static gcmp::OwnerPtr<IJournalCommandData> Create();

        /// \brief 设置Command的名字
        ///
        /// \param[in] commandName Command的名字
        /// \return 运行结果，true成功，false失败
        virtual bool SetCommandName(const std::wstring &commandName) = 0;

        /// \brief 获取Command的名字
        ///
        /// \return Command的名字
        virtual const std::wstring & GetCommandName() const = 0;

        /// \brief 设置Command的参数数组
        ///
        /// \param[in] paramArray Command的参数数组
        /// \return 运行结果，true成功，false失败
        virtual bool SetParameterArray(const gcmp::CommandParameters &paramArray) = 0;

        /// \brief 获取Command的参数数组
        ///
        /// \param[out] paramArray Command的参数数组
        /// \return 运行结果，true成功，false失败
        virtual bool GetParameterArray(gcmp::CommandParameters &paramArray) const = 0;
    };
}

